# -*- coding: utf8 -*-
from Dingding_robot import Newrobot
from getApiInfo import reportWeather
from os import getenv


def main_handler(event, context):
    robot1=Newrobot(access_token=getenv('access_token'),secret=getenv('secret'))
    data= {
        "msgtype": "text",
        "text": {
            "content": reportWeather()
        },
        "at": {
            "isAtAll": False
        }
    }

    robot1.request(data)